﻿#ifndef __ENEMY_MODEL_H__
#define __ENEMY_MODEL_H__

#include <Ogre.h>
#include "PapaObject.h"
#include "utility.h"

class EnemyModel: public PapaObject
{
public:
	EnemyModel(Ogre::SceneManager * sm);
	~EnemyModel(void);

	void Initialization();
	void AddTime(Ogre::Real deltaTime);

	void setOrbit(Ogre::Vector3 target);
	void setTarget(Ogre::Vector3 t);
	
	
private:
	Ogre::SceneManager *mSceneMgr;
	Ogre::Entity *mPlaneEntity;
	Ogre::ParticleSystem * _thrusters;
	Ogre::Vector3 target;
	Ogre::Vector3 ReDiveStart;

	//Ogre::Animation* anim;
	//Ogre::NodeAnimationTrack* track;
	//Ogre::AnimationState* mPlaneAnimState;
	enum planeStatus{ DIVING, TURNING, RETURNING, REDIVETURNING };
	planeStatus EnemyStatus;
	
	void setupThrusters();
	void updatePlane();
	void turnAround();
};

#endif
